import { service } from '../index'
import { IhomeData, IlistData, IClassify, ICity } from '../typing'

type Res<T> = Promise<ItypeAPI<T>>;
// 一般情况下响应数据返回的这三个参数，
// 但不排除后端返回其它的可能性，
interface ItypeAPI<T> {
  msg: T; // 返回状态码的信息，如请求成功等
  code: number; //返回后端自定义的200，404，500这种状态码
}

//1.2列表
export function cityList(data): Res<any> {
  return service.post<object>('/city/cityList',data)
}
//1.2 城市详情
export function details(data): Res<any> {
  return service.post<object>('/city/detail',data)
}
//1.2 图片列表
export function getImages(data): Res<any> {
  return service.post<object>('/city/getImages',data)
}
//城市巡回
export function cityIndex(data): Res<any> {
  return service.post<object>('/city/index',data)
}
//城市详情
export function cityDetail(data): Res<any> {
  return service.post<object>('/city/cityDetail',data)
}
// 城市报名列表
export function cityOrderList(data): Res<any> {
  return service.post<object>('/city/orderList',data)
}
//报名表单页面数据
export function cityEnrollForm(data): Res<any> {
  return service.post<object>('/city/enrollForm',data)
}

//添加订单
export function cityAddOrder(data): Res<any> {
  return service.post<object>('/city/addOrder',data)
}
//收银台
export function cityCashier(data): Res<any> {
  return service.post<object>('/city/cashier',data)
}
//订单拉起支付
export function cityOrderPay(data): Res<any> {
  return service.post<object>('/city/orderPay',data)
}
//报名订单详情
export function cityOrderDetail(data): Res<any> {
  return service.post<object>('/city/orderDetail',data)
}
//订单报名信息
export function cityFormInfo(data): Res<any> {
  return service.post<object>('/city/formInfo',data)
}
//取消报名
export function cityOrderCancel(data): Res<any> {
  return service.post<object>('/city/orderCancel',data)
}
